# Maintainer: Caleb Maclennana <caleb@alerque.com>

BUILDENV+=(!check)

pkgname=python-pytest-param-files
_pyname=${pkgname#python-}
pkgver=0.3.5
pkgrel=2
pkgdesc='Create pytest parametrize decorators from external files '
arch=(any)
url="https://github.com/chrisjsewell/$_pyname"
license=(MIT)
depends=(python
         python-pytest)
makedepends=(python-{build,installer,wheel}
             python-flit-core)
_archive="${_pyname//-/_}-$pkgver"
source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz")
sha256sums=('33e5b7ef41a7e89d9c04749156062701d9a4ef39fa0805741adb4f31765a6da5')

build() {
	cd "$_archive"
	python -m build -wn
}

check() {
	cd "$_archive"
	pytest
}

package() {
	cd "$_archive"
	python -m installer -d "$pkgdir" dist/*.whl
	install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
}
